home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / access.h < prev    next >
C/C++ Source or Header  |  1991-06-25  |  3KB  |  72 lines

  1. /*
  2.  *  access.h - account access definitions
  3.  *
  4.  **********************************************************************
  5.  * HISTORY
  6.  * 08-Dec-85  Glenn Marcy (gm0w) at Carnegie-Mellon University
  7.  *    Added 4.2 daemons and RFS to access list.  Changed all
  8.  *    failure access codes to correspond to 4.2 accounting
  9.  *    system.
  10.  *
  11.  * 09-Oct-85  Glenn Marcy (gm0w) at Carnegie-Mellon University
  12.  *    Added ACCESS_CODE_NOTLOGIN for new failure from oklogin().
  13.  *
  14.  * 03-Jun-85  Glenn Marcy (gm0w) at Carnegie-Mellon University
  15.  *    Added ACCESS_CODE_INSECUREPWD for failures after okpassword().
  16.  *
  17.  * 29-Jul-83  Mike Accetta (mja) at Carnegie-Mellon University
  18.  *    Created.
  19.  *
  20.  **********************************************************************
  21.  */
  22.  
  23.  
  24. /*
  25.  *  Format of a login account access record (in /usr/adm/access)
  26.  */
  27.  
  28. struct access
  29. {
  30.     char      acs_name[8];        /* login name accessed */
  31.     short      acs_uid;        /* from user ID */
  32.     dev_t      acs_ttydev;        /* on terminal device */
  33.     struct ttyloc acs_ttyloc;        /* with terminal location */
  34.     time_t      acs_time;        /* at time */
  35.     long      acs_type:5,        /* from agent (see below) */
  36.           acs_code:5,        /* with result (see below) */
  37.           acs_pad:22;        /* reserved for future expansion */
  38. };
  39.  
  40. /*
  41.  *  Access types
  42.  */
  43. #define    ACCESS_TYPE_LOGIN    01    /* login program */
  44. #define    ACCESS_TYPE_SU        02    /* su program */
  45. #define    ACCESS_TYPE_FTP        03    /* ftp program */
  46. #define    ACCESS_TYPE_CMUFTP    04    /* cmuftp program */
  47. #define    ACCESS_TYPE_SUP        05    /* supfilesrv program */
  48. #define    ACCESS_TYPE_RFS        06    /* remote file system server */
  49. #define ACCESS_TYPE_RLOGIN    07    /* remote login program */
  50. #define ACCESS_TYPE_REXEC    10    /* remote exec program */
  51. #define ACCESS_TYPE_RSH        11    /* remote shell program */
  52.  
  53. /*
  54.  *  Access codes
  55.  */
  56. #define    ACCESS_CODE_INSECUREPWD    03    /* insecure password */
  57. #define    ACCESS_CODE_NODIR    02    /* no directory */
  58. #define    ACCESS_CODE_DENIED    01    /* accessed denied */
  59. #define    ACCESS_CODE_OK        00    /* unused */
  60. #define    ACCESS_CODE_NOUSER    (-1)    /* unknown user */
  61. #define    ACCESS_CODE_BADPASSWORD (-2)    /* invalid password */
  62. #define    ACCESS_CODE_ACCEXPIRED    (-3)    /* account is expired */
  63. #define    ACCESS_CODE_GRPEXPIRED    (-4)    /* group is expired */
  64. #define    ACCESS_CODE_ACCNOTVALID    (-5)    /* account not valid for login or su */
  65. #define    ACCESS_CODE_MANYDEFACC    (-6)    /* more than one default account */
  66. #define    ACCESS_CODE_NOACCFORGRP    (-7)    /* no account found for group */
  67. #define    ACCESS_CODE_NOGRPFORACC    (-8)    /* no group found for account */
  68. #define    ACCESS_CODE_NOGRPDEFACC    (-9)    /* no default login account group */
  69. #define    ACCESS_CODE_NOTGRPMEMB    (-10)    /* not member of group */
  70. #define    ACCESS_CODE_NOTDEFMEMB    (-11)    /* not member of default login group */
  71. #define    ACCESS_CODE_OOPS    (-12)    /* shouldn't happen */
  72.